<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        li {
            width: 100px;
            height: 40px;
            background-color: pink;
            list-style: none;
            /* 强制一行显示*/
            white-space: nowrap;
            /* 溢出隐藏 */
            overflow: hidden;
            /* 溢出部分变成... */
            text-overflow: ellipsis;
        }
    </style>
</head>

<body>
    <li>的发货的皇帝啊哈哈u大法师hi差点</li>
</body>

</html>